<?php
namespace Home\Controller;

use Common\Controller\HomeController;
use Common\Model\CategoryModel;
use Org\Data\Data;
use Think\Controller;

class IndexController extends HomeController
{
	protected $cateModel;

	public function __init ()
	{
		$this->cateModel = new CategoryModel();
	}

	public function index ()
	{
		$cateData = $this->cateModel->select();
		$cateList = ( new Data() )->channelLevel( $cateData );
		$this->assign( 'cateList' , $cateList );
		$this->display();
	}
}